
class PageParams {
  int? _page; // 当前页数
  int? _pageSize; // 每页条数

  int? get page {
    if(_page == null || _page! <= 0){
      return 1;
    }
    return _page;
  }

  set page(int? value) {
    _page = value;
  }

  //默认10
  int get pageSize {
    return _pageSize ?? 20;
  }

  set pageSize(int? value) {
    _pageSize = value;
  }

  int get offset {
    return (page!-1)*pageSize;
  }





}